//浮动相关
//右浮动
.fr {
  float: right;
}

//左浮动
.fl {
  float: left;
}

//清除浮动
.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

//flex相关
.d-f {
  display: flex;
}
// 换行
.f-w-w{
  flex-wrap: wrap;
}
.a-i-c {
  align-items: center;
}

.j-c-c {
  justify-content: center;
}

// flex 居中
.flex-center {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  .el-icon-picture-outline {
    font-size: 24px;
    color: #565656;
  }
}


//文字相关
//省略只兼容webkit内核的浏览器：
.ellipsis { //只显示一行，超出部分用省略号
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ellipsis-2 { //只显示两行(或多行)，超出部分用省略号
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; // 控制多行的行数
  -webkit-box-orient: vertical;
}

.ellipsis-3 { //只显示三行(或多行)，超出部分用省略号
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3; // 控制多行的行数
  -webkit-box-orient: vertical;
}

.ellipsis-4 { //只显示四行(或多行)，超出部分用省略号
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4; // 控制多行的行数
  -webkit-box-orient: vertical;
}

//间距相关
//左外边距
.ml-6 {
  margin-left: 6px;
}

.ml-10 {
  margin-left: 10px;
}

.ml-15 {
  margin-left: 15px;
}

.ml-20 {
  margin-left: 20px;
}

//下外边距
.mb-6 {
  margin-bottom: 6px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

//上外边距
.mt-6 {
  margin-top: 6px;
}

.mt-10 {
  margin-top: 10px;
}

.mt-15 {
  margin-top: 15px;
}

.mt-20 {
  margin-top: 20px;
}

//上外边距
.mr-6 {
  margin-right: 6px;
}

.mr-10 {
  margin-right: 10px;
}

.mr-15 {
  margin-right: 15px;
}

.mr-20 {
  margin-right: 20px;
}

//左内边距
.pl-6 {
  padding-left: 6px;
}

.pl-10 {
  padding-left: 10px;
}

.pl-15 {
  padding-left: 15px;
}

.pl-20 {
  padding-left: 20px;
}

//下内边距
.pb-6 {
  padding-bottom: 6px;
}

.pb-10 {
  padding-bottom: 10px;
}

.pb-15 {
  padding-bottom: 15px;
}

.pb-20 {
  padding-bottom: 20px;
}

//上内边距
.pt-6 {
  padding-top: 6px;
}

.pt-10 {
  padding-top: 10px;
}

.pt-15 {
  padding-top: 15px;
}

.pt-20 {
  padding-top: 20px;
}

//上内边距
.pr-6 {
  padding-right: 6px;
}

.pr-10 {
  padding-right: 10px;
}

.pr-15 {
  padding-right: 15px;
}

.pr-20 {
  padding-right: 20px;
}



// ********** 自定义 样式 ************
//基础投影
.base-shadow{
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
}
.shadow{
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}

//圆角+阴影
.ml__radius {
  border-radius: 6px;
  background-color: #fff;
  -webkit-box-shadow: 0 3px 15px 0 rgba(106, 112, 120, .1);
  box-shadow: 0 3px 15px 0 rgba(106, 112, 120, .1);
}

//编辑区样式
.edit__item {
  width: 100%;
  margin-bottom: 15px;
  display: flex;
  .edit__title {
    max-width: 100px;
    min-width: 74px;
    height: 32px;
    line-height: 32px;
    margin-right: 6px;
    padding-left: 5px;
    font-size: 14px;
    color: #353535;
    text-align: right;
  }
  .edit__cont {
    flex: 1;
    overflow: hidden;
  }
}
.edit__item:last-child{
  margin-bottom: 0;
}



// ********** element-ui 样式 ************

/*Button 按钮*/
.el-button {
  padding: 8px 24px;
  border-radius: 2px;
  &.el-button--mini{
    padding: 7px 15px;
  }
}

//Radio 单选框
.vy-radio{
  &.el-radio-group{
    .el-radio{
      line-height: 1.8;
      margin-right: 12px;
      .el-radio__label{
        padding-left: 6px;
      }
      &:last-child{
        margin-right: 0!important;
      }
    }
  }
}

// ColorPicker 颜色选择器  隐藏清空和确定按钮
.vy-color{
  width: 24px;
  height: 24px;
  padding: 2px;
  .el-color-picker__trigger{
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(0, 0, 0, .4);
    .el-color-picker__color{
      border: none;
    }
  }
  .el-color-picker__icon{
    display: none;
  }
}
.vy-color-pop{
  .el-button--mini{
    display: none;
  }
}


// Collapse 折叠面板
.vy__collapse{
  &.el-collapse{
    border-top: none;
    border-bottom: none;
    .el-collapse-item__header{
      height: 40px;
      line-height: 40px;
      border-bottom:none;
      .el-collapse-item__arrow{
        order: -1;
        margin: 0 9px 0 2px;
        font-size: 14px;
        color: #616161;
        &:before{
          content: "\e791";
        }
      }
    }
    .el-collapse-item__wrap{
      padding: 0 0 0 10px;
      border-bottom:none;
    }
    .el-collapse-item__content{
      padding-bottom: 10px;
      line-height: normal;
    }
  }
}

// Message 消息提示 组件样式
.el-message {
  min-width: 120px;
  padding: 12px 15px;
  background: #ffffff;

  .el-message__icon {
    font-size: 18px;
  }
}

/*Loading 加载*/
.el-loading-mask {
  background-color: hsla(0, 0%, 100%, 1);
}





/*Tabs 标签页*/
.el-tabs {
  .el-tabs__nav-scroll {
    padding-left: 20px;
  }

  .el-tabs__item {
    height: 56px;
    line-height: 56px;
    font-size: 15px;
  }

  .el-tabs__active-bar {
    height: 3px;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
    opacity: 0.9;
  }
}

.vy-tabs{
  &.el-tabs--border-card{
    border: none;
    box-shadow: none;
    .el-tabs__header{
      border: none;
    }
    .el-tabs__nav{
      display: flex;
      width: 100%;
    }
    .el-tabs__item{
      flex: 1;
      text-align: center;
      border: none;
    }
    .el-tabs__item.is-active{
      border-right: none!important;
      border-left: none!important;
    }
    .el-tabs__nav-scroll{
      padding-left: 0;
    }
  }
}

.ml-tabs-edit {
  .el-tabs__nav-scroll {
    padding: 0;
  }

  .el-tabs__content {
    padding: 0 10px;
  }
}

/*Dialog 对话框*/
.el-dialog {
  .el-dialog__header {
    position: relative;
    width: 100%;
    height: 48px;
    line-height: 48px;
    padding: 0;
    padding-left: 30px;
    border-bottom: 1px solid #e3e2e8;
    /*cursor: move;*/
    .el-dialog__title {
      font-size: 16px;
      color: #333333;
    }

    .el-dialog__headerbtn {
      top: 0;
      bottom: 0;
      margin: auto;
      font-size: 20px;
    }
  }

  .el-dialog__body {
    padding: 12px 20px;
    border-bottom: 1px solid #e3e2e8;
  }

  .el-dialog__footer {
    padding: 10px 20px;
    text-align: center;

    .el-button + .el-button {
      margin-left: 30px;
    }
  }
}

/* Table 表格 */
.ml-table {
  /*斑马条纹、无边框的表格*/
  &.ml-table-border {
    border: 1px solid #e3e2e8;
  }

  &.el-table {
    color: #444444;
    font-size: 13px;

    thead {
      color: #333333;
    }

    th {
      padding: 14px 0;
      font-weight: normal;
      /*background: #f5f5f5;*/
      background: #f8f9fb;

      > .cell {
        border-left: 1px solid #e3e2e8;
        margin-left: -2px
      }
    }

    td {
      padding: 9px 0;
      /*>.cell{*/
      /*border-left: 1px solid #e3e2e8;*/
      /*}*/
    }

    th:first-child {
      > .cell {
        border-left: none;
      }
    }

    .el-table__row:nth-child(2n) {
      td {
        background: #f8f9fb;
      }
    }
  }

  .el-table--border {
    th, td {
      border-right: none;
    }
  }

  th.is-leaf, td {
    //border-bottom: none;
  }

  &::before {
    background: #f7f7f7;
  }

  &.el-table--striped .el-table__body tr.el-table__row--striped td {
    background: #f8f9fb;
  }

  .el-table__fixed::before, .el-table__fixed-right::before {
    display: none;
  }
}

.el-table.el-table--enable-row-hover .el-table__body tr:hover > td {
  /*background-color: #f8fcff;*/
  background-color: #e7f5ff;
}

/* Switch 开关 */
.ml-switch-mini { // 迷你尺寸样式
  min-width: 28px;
  height: 16px;
  line-height: 14px;

  .el-switch__core {
    width: 100% !important;
    height: 100%;

    &::after {
      width: 12px;
      height: 12px;
    }
  }
}

.el-switch {
  .el-switch__core {
    background: #cccccc !important;
    border: 1px solid transparent !important;
  }

  &.is-checked {
    .el-switch__core {
      background: #fe714b !important;
      border: 1px solid transparent !important;

      &::after {
        margin-left: -1px;
        -webkit-transform: translateX(-100%);
        -moz-transform: translateX(-100%);
        -ms-transform: translateX(-100%);
        -o-transform: translateX(-100%);
        transform: translateX(-100%);
      }
    }
  }
}

/*Tree 树形控件*/
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
  background-color: $primary;
  color: #ffffff;
}

/*Transfer 穿梭框*/
.ml-transfer-mini {
  .el-transfer-panel {
    width: 145px;

    .el-transfer-panel__header .el-checkbox .el-checkbox__label {
      font-size: 14px;
    }
  }

  .el-transfer__buttons {
    width: 36px;
    padding: 0 5px;
  }

  .el-transfer__button {
    padding: 5px;
  }

  .el-button + .el-button {
    margin-left: 0;
  }

  .el-checkbox {
    margin-right: 10px;
  }
}

